<template>
	<view :class="vi_pageSize">
		<vi-notify :top="topfix" ref="vi_notify"></vi-notify>
		<module-loading ref="vi_loading" :loading="vi_loading" :loadingMask="vi_loadingMask"></module-loading>
		<vi-headbar goback>
			<view slot="right">
				响应式
				<text class="response">开启</text>
				<text class="noresponse color-warning">关闭</text>
			</view>
			{{vi_pageTitle}}
		</vi-headbar>
		
		<view class="p-md">
			<vi-steps v-model="value" :dataList="dataList"></vi-steps>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value:0,
				dataList:[
					{
						title:"开始",
					},
					{
						title:"一阶段",
					},
					{
						title:"二阶段",
					},
					{
						title:"完成",
					},
				]
			}
		},
		methods: {
			
		},
		onLoad(){
			let worker = new Worker('/static/js/worker.js',{name:"compute"});
			let _this = this;
			worker.postMessage({event:"start",list: this.dataList});
			worker.onmessage =function(e){
				let data = e.data;
			    if(data.event=="step"){
					_this.value = data.value;
					console.log(_this.dataList[0]);
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
.pageContainer{
	
}
</style>
